package test.flow;

import hyl.base.flow.Flow;
import hyl.base.flow.PoolFlow;
import hyl.base.flow.Track;
import hyl.core.MyFun;
import hyl.core.run.IDelegate;

public class testflow {
	PoolFlow fp=	PoolFlow.getInstance();
	Flow model=fp.getFlowModel("制度提现流程");
	public static void main(String[] arg) {
		
		testflow tf=	new testflow();
		tf.test();
	//	testExpr te=	new testExpr();

	//	te. testor(tf.model);
		// testand();
		
	//	testor3();
	//	testand3();
		

		// testand4();
		// test5();
		// test6();
	}

	public void test() {
	/*	model.getLink("银行充值")._BeforeRun=new IDelegate<Track>() {
		  public	String call(Track obj) {
				return "成功";
			}
		};*/
		String flowid=MyFun.getUUID();
		Track trk=model.getTrkInstance(flowid);
		Long l=	MyFun.getNs();

		model.getLink("乙方提现申请").run(trk);

		model.getLink("甲方审核通过").run(trk);

		model.getLink("甲方拒绝").run(trk);
		
		model.getLink("归档结清").run(trk);
		trk.finish();
		//trk.back(trk);
	
		l=	MyFun.getNs()-l;
		System.out.println("累计时长"+l);
	}
}
